//
//  DestinationMoreCollectionViewCell.m
//  CommonFrame
//
//  Created by Bang-guo on 15/7/24.
//  Copyright (c) 2015年 guobang. All rights reserved.
//

#import "DestinationMoreCollectionViewCell.h"

@implementation DestinationMoreCollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViews];
        
    }
    return self;
}

-(void)createSubViews {
    self.cityImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, (WIDTH - 45) / 2, (WIDTH - 45) / 2)];
    
    //    self.cityImage.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.cityImage];
    self.cityImage.userInteractionEnabled = YES;
    self.cityImage.layer.masksToBounds = YES;
    self.cityImage.layer.cornerRadius = 5;
    
    self.cityL = [[BaseLabel alloc] initWithFrame:CGRectMake(5, self.cityImage.frame.size.height - 25, self.cityImage.frame.size.width - 10, 20)];
    //    self.cityL.backgroundColor = [UIColor orangeColor];
    [self.cityImage addSubview:self.cityL];
    self.cityL.userInteractionEnabled = YES;
    self.cityL.font = [UIFont boldSystemFontOfSize:15.0];
    //    self.cityL.font = [UIFont fontWithName:@"TrebuchetMS-Bold" size:15];
    self.cityL.textColor = [UIColor whiteColor];
}

-(void)setDes:(DestinationMore *)des {
    
    if (_des != des) {
        
        _des = des;
    }
    
    [self.cityImage sd_setImageWithURL:[NSURL URLWithString:des.cover_s] placeholderImage:[UIImage imageNamed:@"icon1024.png"]];
    self.cityL.text = des.name;
    
    
    
    
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
